import request from '@/utils/request'

// 借款订单信息
export const orderInfo = (creditOrderId) => {
  return request({
    url: `/creditDetail/orderInfo/${creditOrderId}`,
    method: 'get'
  })
}
// 用户信息 (已绑定用户信息 + 个人信息-用户录入)
export const userInfo = (orderId) => {
  return request({
    url: `/creditDetail/userInfo/${orderId}`,
    method: 'get'
  })
}
// 用户工作信息
export const userWorkInfo = (orderId) => {
  return request({
    url: `/creditDetail/userWorkInfo/${orderId}`,
    method: 'get'
  })
}
// 个人信息
export const personalInfo = (userId) => {
  return request({
    url: `/user/info/${userId}`,
    method: 'get'
  })
}
// 当前设备信息
export const deviceInfo = (creditOrderId) => {
  return request({
    url: `/creditDetail/currDevice/${creditOrderId}`,
    method: 'get'
  })
}
// 联系人-用户录入
export const userContact = (orderId) => {
  return request({
    url: `/creditDetail/userContact/${orderId}`,
    method: 'get'
  })
}
// KTP验证
export const ktpCheckInfo = (params) => {
  return request({
    url: '/creditDetail/ktpCheckInfo',
    params,
    method: 'get'
  })
}
// 活体校验
export const livingCheckInfo = (params) => {
  return request({
    url: '/creditDetail/livingCheckInfo',
    params,
    method: 'get'
  })
}
// 风险识别-星合星探
export const xingheReport = (creditOrderId) => {
  return request({
    url: `/creditDetail/xingheReport/${creditOrderId}`,
    method: 'get'
  })
}
// 人脸黑名单-星合星探
export const queryFaceBlacklist = (params) => {
  return request({
    url: '/creditDetail/queryFaceBlacklist',
    params,
    method: 'get'
  })
}
// 拨号检测数据展示
export const listMsisdn = (creditOrderId) => {
  return request({
    url: `/creditDetail/listMsisdn/${creditOrderId}`,
    method: 'get'
  })
}
// 拨号检测
export const queryMsisdnStatus = (params) => {
  return request({
    url: '/creditDetail/queryMsisdnStatus',
    params,
    method: 'get'
  })
}
// 手输入 拨号检测数据展示
export const listMsisdnManualRecord = (params) => {
  return request({
    url: '/creditDetail/listMsisdnManualRecord',
    params,
    method: 'get'
  })
}
// 信用分
export const creditScore = (userId) => {
  return request({
    url: `/creditDetail/queryCreditScore/${userId}`,
    method: 'get'
  })
}
// 电信分
export const telecomScore = (userId) => {
  return request({
    url: `/creditDetail/queryTelecomScore/${userId}`,
    method: 'get'
  })
}
// izi - 多头评分
export const inquiriesScore = (data) => {
  return request({
    url: `/creditDetail/izi/inquiriesScore/${data['creditOrderId']}/${data['queryType']}`,
    method: 'get'
  })
}
// izi - 定制特征
export const creditFeature = (data) => {
  return request({
    url: `/creditDetail/izi/creditFeature/${data['creditOrderId']}/${data['queryType']}`,
    method: 'get'
  })
}
// izi - 欺诈识别
export const fraud = (data) => {
  return request({
    url: `/creditDetail/izi/fraud/${data['creditOrderId']}/${data['queryType']}`,
    method: 'get'
  })
}
// 多设备号
export const creditDeviceInfo = (userId) => {
  return request({
    url: `/creditDetail/listDevice/${userId}`,
    method: 'get'
  })
}
// 评分查询-advance.ai
export const advanceInfo = (userId) => {
  return request({
    url: `/creditDetail/advanceScore/${userId}`,
    method: 'get'
  })
}
// 评分查询-冰鉴
export const bingjian = (data) => {
  return request({
    url: `/creditDetail/bingjian/${data['creditOrderId']}/${data['queryType']}`,
    method: 'get'
  })
}
// 自研模型调用
export const getUserGradeBySelfSupport = (data) => {
  return request({
    url: `/creditDetail/getUserGradeBySelfSupport/${data['creditOrderId']}/${data['type']}`,
    method: 'get'
  })
}
// 联系人状态编辑
export const updateUserContactStatusput = (data) => {
  return request({
    url: '/creditDetail/updateUserContactStatus',
    data,
    method: 'put'
  })
}
// 用户账户；公司电话状态编辑
export const updateUserPhoneStatus = (data) => {
  return request({
    url: '/creditDetail/updateUserPhoneStatus',
    data,
    method: 'put'
  })
}
// 发送短信
export const sendMsg = (data) => {
  return request({
    url: '/creditDetail/sendMsg',
    data,
    method: 'post'
  })
}
// 审核
export const riskAudit = (data) => {
  return request({
    url: '/risk/audit',
    data,
    method: 'put'
  })
}
// 黑名单状态修改
export const creditStatus = (data) => {
  return request({
    url: '/user/info/creditStatus',
    data,
    method: 'put'
  })
}
